package com.wantup.controller.v4;

import com.wantup.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

/**
 * @ClassName ServerInfoControllerV4
 * @Description 实时推送jvm负载 已用内存等情况
 * @Author zhaoluowei
 * @Date 2019/6/23  21:45
 * @Version 1.0
 */
@Controller
public class ServerInfoControllerV4 {

    @Autowired
    private WebSocketService webSocketService;

    @MessageMapping(value = "/v4/schedule/push")
//    @Scheduled(fixedRate = 3000)
    public void sendServerInfo(){
        System.out.println("我执行了 --> 实验测试方法");
        webSocketService.sendServerInfo();
    }

}
